<template>
  <div>
    <el-alert
        style="margin-bottom:10px"
          :title="`数据一共${counts}条`"
          type="info"
          show-icon
          :closable="false">
        </el-alert>
    <el-table
    :data="allInfo"
    style="width: 100%">
    <el-table-column
      prop="number"
      label="试题编号"
      width="150">
    </el-table-column>
    <el-table-column
      prop="subjectID"
      label="姓名"
      width="120">
    </el-table-column>
    <el-table-column
      prop="catalog"
      label="目录"
      width="120">
    </el-table-column>
    <el-table-column
      prop="questionType"
      label="题型"
      width="120">
    </el-table-column>
    <el-table-column
      prop="question"
      label="题干"
      width="120">
    </el-table-column>
    <el-table-column
      prop="addDate"
      label="录入时间"
      width="150">
      <template v-slot="{row}">
          {{ row.addDate | formatDate }}
      </template>
    </el-table-column>
    <el-table-column
      prop="difficulty"
      label="难度"
      width="120">
    </el-table-column>
    <el-table-column
      prop="creator"
      label="录入人"
      width="120">
    </el-table-column>
    <el-table-column
      prop="chkState"
      label="审核状态"
      width="120">
    </el-table-column>
    <el-table-column
      prop="chkState"
      label="审核意见"
      width="120">
    </el-table-column>
    <el-table-column
      prop="chkState"
      label="审核人"
      width="120">
    </el-table-column>
    <el-table-column
      prop="chkState"
      label="发布状态"
      width="120">
    </el-table-column>
    <el-table-column
      fixed="right"
      label="操作"
      width="100">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
        <el-button type="text" size="small">编辑</el-button>
      </template>
    </el-table-column>
  </el-table>
  </div>
</template>

<script>
export default {
  name: '',
  components: {},
  props: {
    allInfo: {
      type: Array,
      required: true
    },
    counts: {
      type: Number,
      required: true
    }
  },
  data () {
    return {
    }
  },
  async created () {},
  mounted () {},
  methods: {
    handleClick (row) {
      console.log(row)
    }
  }
}
</script>

  <style lang="scss" scoped>

  </style>
